package com.kaluli.system.listener;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import com.kaluli.project.service.KllOrderSynApiService;

/**
 * 启动监听器
*
* @author zyzowen1944
*/
@Service
@Component
public class StartupListener implements ApplicationListener<ContextRefreshedEvent> {

   @Autowired
  private KllOrderSynApiService kllOrderSynApiService;
   @Override
   public void onApplicationEvent(ContextRefreshedEvent evt) {
       if (evt.getApplicationContext().getParent() == null) {
    	   		kllOrderSynApiService.initTradeThread();
       }
   }

   
}